home *** CD-ROM | disk | FTP | other *** search
/ The Programmer Disk / The Programmer Disk (Microforum).iso / xpro / tutor / pro24 / sample.prg < prev   
Encoding:
Text File  |  1991-11-23  |  2.0 KB  |  63 lines

  1. *****************************************************************************
  2. *:
  3. *: CLIPDOS.LIB, CLIPDOS.OBJ, SAMPLE.PRG - November 1991
  4. *: Michael Blankenship, Innovative Computer Solutions
  5. *:
  6. *: The following program demonstrates some of the functions included in
  7. *: the CLIPDOS library.
  8. *:
  9. *: [The CURDIR() function is part of the Clipper language.]
  10. *:
  11. *:
  12. *: Feel free to use variable names by reference (or macro substitution)
  13. *: as you normally would with Clipper functions, for example:
  14. *:
  15. *: STORE "C:\\DBASE\\DATA" TO NewDir
  16. *: STORE "C:\\DBASE"       TO ThisDir
  17. *: ChangeDir(ThisDir)
  18. *: MakeDir(NewDir)
  19. *:
  20. *: The following program is the smallest and most simple one that I
  21. *: could quickly create to show all of the new functions.  I realize
  22. *: that there are many other different (better) ways to display text
  23. *: and to show off these utilities.
  24. *:
  25. *: The following lines will compile and link SAMPLE.PRG into SAMPLE.EXE:
  26. *:
  27. *: CLIPPER SAMPLE
  28. *: TLINK SAMPLE,,,CLIPPER EXTEND CL CLIPDOS
  29. *:
  30. *: (See notes in CLIPDOS.DOC on whereabouts of CL.LIB and what to do if
  31. *:  you are using a different linker.)
  32. *:
  33. *****************************************************************************
  34.  
  35. CLEAR
  36. ? "Current drive:  "+GetDrive()+":"
  37. ? "Current directory:  \"+CURDIR()
  38. ? ""
  39. ? "Making new directory using MakeDir()..."
  40. IF MakeDir("hello") = 0
  41.      ? "Successful creation of HELLO subdirectory"
  42. ELSE
  43.      ? "Unsuccesful creation of new subdirectory"
  44. ENDIF
  45. ? ""
  46. ? "Changing to new directory using ChangeDir()..."
  47. IF ChangeDir("hello") = 0
  48.      ? "Successful change to HELLO subdirectory"
  49. ELSE
  50.      ? "Unsuccessful change to new subdirectory"
  51. ENDIF
  52. ? ""
  53. ? "Current drive:  "+GetDrive()+":"
  54. ? "Current directory:  \"+CURDIR()
  55. ? ""
  56. ? "Changing the current drive with ChangeDrive()..."
  57. ? "DOS is currently set up for "+LTRIM(STR(ChangeDrv("C")))
  58. ?? " drives in this system."
  59. ? ""
  60. ? "Current drive:  "+GetDrive()+":"
  61. ? "Current directory:  \"+CURDIR()
  62. ? ""
  63.